/*
 *  dna_aircfg.h -- provide dna-system AirConfig client core framework.
 *  
 *  ORIGINAL AUTHOR: Xu Chun (chun.xu@broadlink.com.cn)
 *
 *  Copyright (c) 2016 Broadlink Corporation
 */

#ifndef __DNA_AIRCFG_H
#define __DNA_AIRCFG_H

#ifdef __cplusplus
    extern "C" {
#endif

/*
*  dna-system AirConfig running param.
*/
typedef struct dna_aircfg_param {
    unsigned short fw_version;               /* Firmware version */
    unsigned short svn_version;              /* Firmware svn revision */
    unsigned short protocol_version;         /* Firmware protocol version */
    unsigned short platform;                 /* Hardware platform ID */
    int (* test)(void * arg);                /* Profile test callback interface: 0 - test success */
    void * arg;                              /* Profile test callback interface input param */
    unsigned int exist : 1;                  /* Exist correct profile (=1) */
} dna_aircfg_param_t;

/* 
*  dna-system AirConfig client engine startup.
*
*  @param: airconfig running param
*
*  Return profile upgrade result. (error code refer to dna_errno.h)
*/
int dna_aircfg_start(dna_aircfg_param_t * param);

/* 
*  dna-system AirConfig client the specified AP scan interface (temporary).
*  It only used for AirConfig rework plan.
*
*  @ssid: the specified AP SSID
*  @timeout: ms, if set to 0, then use default (1s)
*
*  Return TRUE on scan success.
*/
int dna_aircfg_rework_scan(const char * ssid, unsigned int timeout);

#ifdef __cplusplus
}
#endif

#endif

